<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>联系我们-北京华腾橡塑乳胶制品有限公司</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/all.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>

<body>
    <div class="flex-container contact">
        #include('inc/top.html')
        <div class="container-fluid">
            <div class="intobg"></div>
        </div>

        <div class="container text-center pb-2">
            <h2 class="product-title">联系我们</h2>
            <p class="product-subtitle">Contact Us</p>
        </div>
        <div class="container-fluid eq-bg">
            <div class="container pt-4">
                <div class="row align-items-center justify-content-md-center">
                    #ArticleEnhancePage(categoryId=9)
                    #for(article : ArticleEnhancePage.list)
                    <div class="col-5">
                        <div class="bg">
                            <span>
                                <img src="#(article.thumbnail ??)" alt="">
                            </span>
                            <p class="title">#(article.title ??)</p>
                            #(article.content ??)
                        </div>
                    </div>
                    #end
                    #end
                </div>
            </div>
        </div>

        <div class="container text-center pb-2">
            <h2 class="product-title">如果您想要了解我公司更多产品或者其他需求，请给我们留言，我们会在第一时间联系您！</h2>
            <form action="/msgController/doSave" method="post" onsubmit="return postdata();">
            <div class="row form">
                <div class="col">
                    <input type="text" name="data.name" id="name" class="form-control" placeholder="姓名">
                    <input type="text" name="data.phone" id="phone" class="form-control" placeholder="电话">
                    <input type="text" name="data.email" id="email" class="form-control" placeholder="电子信箱">
                </div>
                <div class="col">
                    <textarea name="data.message" id="message" cols="30" rows="3" class="form-control" placeholder="留言"></textarea>
                    <div style="position: relative;">
                        <input type="text" class="form-control" maxlength="6" placeholder="验证码">
                        <a href="#"><img src="images/code.jpg" class="vcode" alt="点击刷新验证码"></a>
                    </div>
                    <button type="submit" class="btn btn-primary float-right">提交留言</button>
                </div>
            </div>
        </form>
        </div>
        <div class="container map">
            #ArticleEnhancePage(categoryId=17)
                #for(article : ArticleEnhancePage.list)
                <p class="title">#(article.title ??)</p>
                <div class="content">
                    #(article.content ??)
                </div>
                #end
            #end
        </div>
    </div>
    <!--bottom-->
    #include('inc/footer.html')

    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script>
        
        function postdata(){
            
            var url = "/msgController/doSave";
            var data = {
                "data.name":$("#name").val(),
                "data.phone":$("#phone").val(),
                "data.email":$("#email").val(),
                "data.message":$("#message").val()
            }
            $.post(url,data,function(e){
                if(e.msg == "ok"){
                    alert("提交成功");    
                }else{
                    alert(e.msg);
                }
                
                
            });
            
            return false;
            
        }
        
    </script>
</body>

</html>